Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: Split class sinsp_with_test_input into hdr + src #1694

Conversation

federico-sysdig
Copy link
Contributor

What type of PR is this?
/kind cleanup

Any specific area of the project related to this PR?
/area libsinsp
/area tests

Does this PR require a change in the driver versions?
No

What this PR does / why we need it:
The test fixture class sinsp_test_with_input is included in many test source files. It is quite large and was all defined in a single header file. Hoping to improve a bit the build time and for better maintainability it has been split into a header/source pair.
Some cleanup of the class has also been performed, for instance the two functions Setup()/TearDown() have been removed in favor of constructor and destructor as GoogleTest's documentation advises.
https://github.com/google/googletest/blob/main/docs/faq.md#should-i-use-the-constructordestructor-of-the-test-fixture-or-setupteardown-ctorvssetup
Also, the gcc-specific __attribute__((unused) has been replaced with the standard C++ attribute [[maybe_unused]] as the project is now at C++17.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Federico Aponte <federico.aponte@sysdig.com>
@FedeDP
Copy link
Contributor

FedeDP commented Feb 16, 2024

/milestone 0.15.0

@poiana poiana added this to the 0.15.0 milestone Feb 16, 2024
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Feb 16, 2024

LGTM label has been added.

Git tree hash: 6a8e264ee555c1fe2fbba9f05d07a1d09cdc930a

@poiana
Copy link
Contributor

poiana commented Feb 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, federico-sysdig, LucaGuerra

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@LucaGuerra
Copy link
Contributor

Thanks!

@poiana poiana merged commit afb905a into falcosecurity:master Feb 16, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants